package com.skysz.socket;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class InetAddressTest {

	/**
	 * @param args
	 * @throws UnknownHostException 
	 */
	public static void main(String[] args) throws UnknownHostException {
		InetAddress addr = InetAddress.getByName("sky-213986cb952.");
		System.out.println(addr.getHostAddress());
		
		addr = InetAddress.getByName(null);
		System.out.println(addr.getHostAddress());
		
		addr = InetAddress.getByName("localhost");
		System.out.println(addr.getHostAddress());
	}

}
